package ioexercise;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;

public class OISDemo {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        //对象流写对象
        FileInputStream fis=new FileInputStream("student0.dat");
        ObjectInputStream ois=new ObjectInputStream(fis);
        Object zs=ois.readObject();
        Student s=(Student) zs;
        System.out.println(s);
    }
}
